import { post, put, get,del } from '@/utils/hettpUtils/httpRequest'

export const dicColumns = [
    {
        title: "名称",
        dataIndex: "name",
    },
    {
        title: "值",
        dataIndex: "val",
    },
    {
        title: "创建人",
        dataIndex: "createUser",
    },
    {
        align: 'center',
        title: "创建时间",
        dataIndex: "createTime",
        sorter: true,
    },
    {
        align: 'center',
        title: "状态",
        dataIndex: "status",
        scopedSlots: { customRender: "status" },
    },
    {
        align: 'center',
        width:'160px',
        title: "操作",
        dataIndex: "action",
        scopedSlots: { customRender: "action" },
    },
];

export const addDic = (parameter) => post('api/sysDic/add', parameter)
export const deleteDic = (parameter) => del('api/sysDic/delete', parameter)
export const updateDic = (parameter) => put('api/sysDic/update', parameter)
export const queryDicPages = (parameter) => post('api/sysDic/pages', parameter)
export const getDic = (parameter) => get('api/sysDic/get', parameter)
// 以下接口传递参数均为：queryDicSelect({ 'dicTypeUniqueCode': 'ProjectCategory' })
export const queryDicSelect = (parameter) => get('api/sysDic/queryDicSelect', parameter)
export const queryDicTreeSelect = (parameter) => get('api/sysDic/queryDicTreeSelect', parameter)
export const queryDicTreeSelect2 = (parameter) => get('api/sysDic/queryDicTreeSelect2', parameter) 
